package com.atguigu.boot.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * spring-boot
 * 2022/9/13 22 47
 */
@RestController
@Slf4j
public class OrderController {
    @RequestMapping("/hello")
    public String hello(){
        String format = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss").format (new Date ());
        log.trace ("---trace");
        log.debug ("---debug");
        log.info ("---info");
        log.warn ("---warn");
        log.error ("---error {}",format);
        log.info ("result is {}",format);
        return format;
    }
}
